package com.geekchique.runningbuddy.model;

import java.util.Calendar;
import java.util.GregorianCalendar;


public class Jog {
	public long _id;
	public String name;
	public long startTime;
	public long stopTime;
	public Calendar startTimeCal;
	public Calendar stopTimeCal;
    
	public Jog() {
	}

	public Jog(long _id, String name, long startTime, long stopTime)
	{
		this._id = _id;
		this.name = name;
		this.startTime = startTime;
		this.stopTime = stopTime;
		
	}
	
	public Jog(String name, long startTime, long stopTime)
	{
		this.name = name;
		this.startTime = startTime;
		this.stopTime = stopTime;
	}

	public long getStopTime() {
		return this.stopTime;
	}

	public long get_id() {
		return _id;
	}

	public void set_id(long _id) {
		this._id = _id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public long getStartTime() {
		return startTime;
	}

	public void setStartTime(long startTime) {
		this.startTime = startTime;
	}

	public Calendar getStartTimeCal() {
		if(startTimeCal == null){
			Calendar cal = new GregorianCalendar();
			cal.setTimeInMillis(startTime);
			return startTimeCal = cal;
		}
		return startTimeCal;
	}

	public void setStartTimeCal(Calendar startTimeCal) {
		this.startTimeCal = startTimeCal;
	}

	public Calendar getStopTimeCal() {
		if(stopTimeCal == null){
			Calendar cal = new GregorianCalendar();
			cal.setTimeInMillis(stopTime);
			return stopTimeCal = cal;
		}
		return stopTimeCal;
	}

	public void setStopTimeCal(Calendar stopTimeCal) {
		this.stopTimeCal = stopTimeCal;
	}

	public void setStopTime(long stopTime) {
		this.stopTime = stopTime;
	}
	
	
	
}
